package com.xiaoxiang.auth.controller;

import com.xiaoxiang.auth.service.MenuService;
import com.xiaoxiang.common.result.HttpResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: haha
 * @date: 2022/3/19 16:22
 */
@RestController
public class MenuController {

    @Resource
    private MenuService menuService;

    @GetMapping("menu")
    public HttpResult getMenu(@RequestParam Long roleId) {
        return HttpResult.success(menuService.queryAllByRoleId(roleId));
    }
}
